home *** CD-ROM | disk | FTP | other *** search
/ Die Speccy' 97 / Die Speccy' 97.iso / amiga_system / the_aminet / comm / cnet / colorutils.lha / ColorUtils < prev    next >
Text File  |  1995-10-07  |  43KB  |  641 lines

  1. /**************************************************************************\
  2.            $VER: Color Utilities, v1.2 (7-Oct-95) by Dotoran!
  3. \**************************************************************************/
  4. options results ; signal on SYNTAX ; signal on ERROR ; signal on IOERR
  5. tr=transmit ; se=sendstring ; gc=getchar ; gu=getuser ; gs=getscratch
  6. qu=query ; changewhere 'Color Utils'
  7.  
  8. BEGIN: /* Define Variables and Display Title Screen */
  9.     call SETUP ; call TITLE
  10.     call INFO('c6Select cfConversion c6using cbARROW KEYSc6, press caENTERc6/caRETURN c6to select...') ; call HELP11
  11. START: /* Start of Main Operations Menu (Choose Conversion) */
  12.     se 'u' ; r=pt1r ; c=pt1c ; gc ; a=result ; call CHECK
  13.     if c2d(a)=13 then signal START2
  14.     if c2d(a)=27 then do ; gc ; gc ; b=result
  15.         if b='A' then do ; pt1r=pt1r-1 ; if pt1r=0 then pt1r=2 ; end
  16.         if b='B' then do ; pt1r=pt1r+1 ; if pt1r=3 then pt1r=1 ; end
  17.         if b='C' then do ; pt1c=pt1c+1 ; if pt1c=7 then pt1c=1 ; end
  18.         if b='D' then do ; pt1c=pt1c-1 ; if pt1c=0 then pt1c=6 ; end ; end
  19.     if a='L' then do ; pt1r=1 ; pt1c=1 ; end ; if a='Y' then do ; pt1r=1 ; pt1c=2 ; end
  20.     if a='S' then do ; pt1r=1 ; pt1c=3 ; end ; if a='M' then do ; pt1r=1 ; pt1c=4 ; end
  21.     if a='I' then do ; pt1r=1 ; pt1c=5 ; end ; if a='X' then do ; pt1r=1 ; pt1c=6 ; end
  22.     if a='H' then do ; pt1r=2 ; pt1c=1 ; end ; if a='N' then do ; pt1r=2 ; pt1c=2 ; end
  23.     if a='O' then do ; pt1r=2 ; pt1c=3 ; end ; if a='C' then do ; pt1r=2 ; pt1c=4 ; end
  24.     if a='D' then do ; pt1r=2 ; pt1c=5 ; end ; if a='Q' then do ; pt1r=2 ; pt1c=6 ; end
  25.     tr 'z0'op.r.c'z4'op.pt1r.pt1c'z0' ; call HELP ; signal START
  26. START2: /* If Expansion Slot or Quit is Chosen, Handle Correctly. */
  27.     if r=1 & c=6 then do
  28.         call INFO('c6There is cacurrently c9NO c6utility module cbassociated c6with this button...c7<cdkeyc7>g1')
  29.         call INFO('c6Select cfConversion c6using cbARROW KEYSc6, press caENTERc6/caRETURN c6to select...')
  30.         signal START ; end
  31.     if r=2 & c=6 then do ; call INFO('cdQuitc6, c9NO c6questions asked...')
  32.         tr '1H' ; exit ; end
  33. START3: /* Get PATH and FILE to Convert. (Error Handling As Well) */
  34.     call INFO('c6Type the caPATHc6/caFILENAME c6of the file you wish to cbConvertc6...')
  35.     se '21Hz1cf'copies(' ',57)'21Hi0 57}z0' ; gu 70 ; path=strip(result)
  36.     if path='' then do
  37.         call INFO('c6You c9MUST c6supply a caPATHc6/caFILENAME c6to ceLOAD c6from...c7<cdkeyc7>g1')
  38.         addkeys (path) ; signal START ; end
  39.     if word(statef(path),1)="DIR" then dir=1 ; else dir=0
  40.     if ~exists(path) & dir=1 then do
  41.         call INFO('c6The specified caPATH c6does c9NOT c6exist...c7<cdkeyc7>g1')
  42.         addkeys (path) ; signal START3 ; end
  43.     if dir=1 then do ; zz=showdir(path,'f',' ')
  44.         call INFO('cfReplace caoriginal c6files with cbconverted c6files? c7[caYesc7]c9:')
  45.         se '55H';gc;aa=result;if aa="N" then do;tr "cbNoc6.";replace=0;end
  46.         else do;tr "caYesc6!";replace=1;end;signal START4A;end
  47.     if ~exists(path) then do
  48.         call INFO('c6Was c9NOT c6able to cffind c6specified file...c7<cdkeyc7>g1')
  49.         addkeys (path) ; signal START3 ; end ; else do;file1=path;zz=file1;end
  50. START4: /* Get PATH & FILE to SAVE Converted File AS. (Error Checking Too) */
  51.     call INFO('c6Type the caPATHc6/caFILENAME c6you wish the cbConverted c6file to be ceSAVED c6as...')
  52.     addkeys (file1) ; se '21Hz1cf'copies(' ',57)'21Hi0 57}z0' ; gu 70 ; a=strip(result)
  53.     if a='' then do
  54.         call INFO('c6You c9MUST c6supply a caPATHc6/caFILENAME c6to ceSAVE c6to...c7<cdkeyc7>g1')
  55.         addkeys (a) ; signal START3 ; end
  56.     if right(a,1)=':' | right(a,1)='/' then do
  57.         call INFO('c6You c9MUST c6also specify a caFILENAME c6to ceSAVE c6to...c7<cdkeyc7>g1')
  58.         addkeys (a) ; signal START4 ; end
  59.     if exists(a) & a~=file1 then do
  60.         call INFO('c6Another file is cbUsing c6this name. c9Overwritec6? c7[caYesc7]c6: ca')
  61.         gc ; b=result ; if b='N' then do ; tr 'No.' ; signal START4 ; end
  62.         tr 'Yes!' ; end ; file2=a
  63. START4A:
  64.     call INFO('c6Select cbView Modec6, caENTERc6/caRETURN c6to select...') ; call HELPB1
  65. START5: /* Start of VIEW MODE Menu */
  66.     se 'u' ; cc=pt2c ; gc ; a=result ; call CHECK
  67.     if c2d(a)=13 then do ; view=cc ; call HELPC1 ; signal START6 ; end
  68.     if c2d(a)=27 then do ; gc ; gc ; b=result
  69.         if b='C' then do ; pt2c=pt2c+1 ; if pt2c=5 then pt2c=1 ; end
  70.         if b='D' then do ; pt2c=pt2c-1 ; if pt2c=0 then pt2c=4 ; end ; end
  71.     if a='N' then do ; pt2c=1 ; end ; if a='B' then do ; pt2c=2 ; end
  72.     if a='A' then do ; pt2c=3 ; end ; if a='O' then do ; pt2c=4 ; end
  73.     tr 'z0'vi.cc'z4'vi.pt2c'z0' ; call HELPB ; signal START5
  74. START6: /* After View Mode Is Selected */
  75.     call INFO('c6Select c9Start Modec6, caENTERc6/caRETURN c6to select...')
  76. START6B: /* Start of START MODE Menu */
  77.     se 'u' ; cc=pt3c ; gc ; a=result ; call CHECK
  78.     if c2d(a)=13 then do ; mode=cc ; signal START7 ; end
  79.     if c2d(a)=27 then do ; gc ; gc ; b=result
  80.         if b='C' then do ; pt3c=pt3c+1 ; if pt3c=6 then pt3c=1 ; end
  81.         if b='D' then do ; pt3c=pt3c-1 ; if pt3c=0 then pt3c=5 ; end ; end
  82.     if a='S' then do ; pt3c=1 ; end ; if a='Q' then do ; pt3c=2 ; end
  83.     if a='R' then do ; pt3c=3 ; end ; if a='C' then do ; pt3c=4 ; end
  84.     if a='I' then do ; pt3c=5 ; end
  85.     tr 'z0'mo.cc'z4'mo.pt3c'z0' ; call HELPC ; signal START6B
  86. START7: /* Handle Various Start Modes. Branch Where Neccessary. */
  87.     if mode=1 then signal START8
  88.     if mode=2 then do
  89.         call INFO('c6You really wish to c9QUIT c6now? c7[caYesc7]c6: ca')
  90.         gc ; a=result ; if a='N' then do ; tr 'No.' ; signal START6 ; end
  91.         tr 'Yes!1H' ; exit ; end
  92.     if mode=3 then do
  93.         call INFO('c6You wish to cbRESTART ceColor Utilsc6? c7[caYesc7]c6: ca')
  94.         gc ; a=result ; if a='N' then do ; tr 'No.' ; signal START6 ; end
  95.         tr 'Yes!' ; signal BEGIN ; end
  96.     if mode=4 then do ; call CHART ; call TITLE ; tr op.1.1'z4'op.r.c'z0'
  97.         tr '21Hz1cf'file1'z021Hz1cf'file2'z0'
  98.         tr vi.1'z4'vi.view'z0'mo.1'z4'mo.mode'z0'
  99.         call HELPC ; signal START6 ; end
  100.     if mode=5 then do
  101.         call INFO('cdDotoran cfThanks You c6for using caanother c6of his cbcreationsc6! c7<cdkeyc7>g1')
  102.         signal START6 ; end
  103. START8: /* Display BEFORE or BOTH file if need be, then start Conversion. */
  104. do loop=1 to words(zz)
  105.   if words(zz)>1 then do
  106.     if index("/:",right(path,1))=0 then path=path"/"
  107.     file1=path||word(zz,loop) ; file2=file1
  108.     if replace=0 then file2=file2".2";end
  109.     if view=2 | view=4 then do
  110.         tr 'f1c6<< c9START c6>>  caPathc6/caFilec6--> cb'file1'n1*0'file1'}'
  111.         tr 'c6<< c9END c6>>  caPathc6/caFilec6--> cb'file1'n2c6->cdKeyg1'
  112.         call TITLE ; tr op.1.1'z4'op.r.c'z0' ; end
  113.     tr '21Hz1cf'left(file1,40)'z0';tr'21Hz1cf'left(file2,40)'z0'
  114.     tr vi.1'z4'vi.view'z0'mo.1'z4'mo.mode'z0'
  115.     if r=1 & c=4 then call MODULE4 ; if r=2 & c=4 then call MODULE9
  116.     call CLEAR ; steps=0 ; sleft=0 ; lines=0 ; codes=0
  117.     call INFO('caPlease hold... cbConverting c9"ce'file1'c9" cbnow...')
  118.     tr '3Hc6Reading Linec9: ca-----         c6Total Stepsc9: ca-            c6Working Stepc9: ca-'
  119.     tr '3Hc6Working Linec9: ca-----     c6Converted Linesc9: ca-----     c6Converted Codesc9: ca-----'
  120.     tr '3Hc6Writing Linec9: ca-----'
  121.     if r=1 & c=1 then call MODULE1    /* Low 8 to High 8              */
  122.     if r=1 & c=2 then call MODULE2    /* Control-Y to Control-Q       */
  123.     if r=1 & c=3 then call MODULE3    /* Slash to Control-Y           */
  124.     if r=1 & c=4 then call MODULE4E   /* MCI Color Swapper            */
  125.     if r=1 & c=5 then call MODULE5    /* High to Low / Low to High    */
  126.     if r=2 & c=1 then call MODULE6    /* High 8 to Low 8              */
  127.     if r=2 & c=2 then call MODULE7    /* Control-Q to Control-Y       */
  128.     if r=2 & c=3 then call MODULE8    /* Old to New Color Order       */
  129.     if r=2 & c=4 then call MODULE9E   /* MCI Color Changer            */
  130.     if r=2 & c=5 then call MODULE10   /* MCI Color Stripper           */
  131. START9: /* Display file if AFTER or BOTH View Mode was Chosen. */
  132.     if view=3 | view=4 then do
  133.         tr 'f1c6<< c9START c6>>  caPathc6/caFilec6--> cb'file2'n1*0'file2'}'
  134.         tr 'c6<< c9END c6>>  caPathc6/caFilec6--> cb'file2'n2c6->cdKeyg1'
  135.         call TITLE ; tr op.1.1'z4'op.r.c'z0'
  136.         tr '21Hz1cf'file1'z021Hz1cf'file2'z0'
  137.         tr vi.1'z4'vi.view'z0'mo.1'z4'mo.mode'z0' ; end
  138. end loop
  139. START9B: /* Either AFTER File is Displayed, or AFTER Conversion Finishes. */
  140.     call INFO('c6Perform ceanother cbConversion c6now? c7[caYesc7]c6: ca')
  141.     gc ; a=result ; if a='N' then do ; tr 'No.1H' ; exit ; end
  142.     tr 'Yes!'
  143.   signal BEGIN
  144.  
  145. MODULE1: /* Change Low 8 MCI Colors into High 8 MCI Colors */
  146.     call READFILE ; steps=1 ; sleft=1 ; tr '44Hca'steps'71H'sleft
  147.     do i=1 to tot ; tr '17H'right(i,5,'-')
  148.     if index(l.i,'c')=0 then iterate i
  149.     else do ; lines=lines+1 ; tr '44H'right(lines,5,'-') ; end
  150.     do j=1 to 8 ; a=word(c1,j) ; b=word(c2,j)
  151.     do until z=0 ; z=index(l.i,a) ; if z>0 then do ; l.i=overlay(b,l.i,z)
  152.     codes=codes+1 ; tr '71H'right(codes,5,'-') ; end
  153.     end ; end j ; end i ; sleft=sleft-1
  154.     tr '71H'sleft ; call SAVEFILE
  155.   return
  156.  
  157. MODULE2: /* Change Control-Y MCI Colors into Control-Q MCI Colors */
  158.     call READFILE ; steps=1 ; sleft=1 ; tr '44Hca'steps'71H'sleft
  159.     do i=1 to tot ; tr '17H'right(i,5,'-')
  160.     if index(l.i,'c')=0 then iterate i
  161.     else do ; lines=lines+1 ; tr '44H'right(lines,5,'-') ; end
  162.     do j=1 to 24 ; a=word(c4,j) ; b=word(c6,j)
  163.     do until z=0 ; z=index(l.i,a) ; if z>0 then do
  164.         l.i=delstr(l.i,z,3) ; l.i=insert(b,l.i,z-1,4)
  165.     codes=codes+1 ; tr '71H'right(codes,5,'-') ; end
  166.     end ; end j ; end i ; sleft=sleft-1
  167.     tr '71H'sleft ; call SAVEFILE
  168.   return
  169.  
  170. MODULE3: /* Change Slash MCI Colors into Control-Y MCI Colors */
  171.     call READFILE ; steps=1 ; sleft=1 ; tr '44Hca'steps'71H'sleft
  172.     do i=1 to tot ; tr '17H'right(i,5,'-')
  173.     if index(l.i,'\c')=0 then iterate i
  174.     else do ; lines=lines+1 ; tr '44H'right(lines,5,'-') ; end
  175.     do j=1 to 24 ; a=word(c3,j) ; b=word(c4,j)
  176.     do until z=0 ; z=index(l.i,a) ; if z>0 then do ; l.i=overlay(b,l.i,z)
  177.     codes=codes+1 ; tr '71H'right(codes,5,'-') ; end
  178.     end ; end j ; end i ; sleft=sleft-1
  179.     tr '71H'sleft ; call SAVEFILE
  180.   return
  181.  
  182. MODULE4: /* Change Set MCI Colors to Other MCI Colors (Swap Them) */
  183.     if loop>1 then return;else call GRID1
  184. MODULE4A: /* Get the FIRST Color */
  185.     call INFO('c6Select c9Color c6to cbSWAPc9:         c6Now Select c9Color c6to Swap cbWITHc9:     ')
  186.     se '25Hca' ; gc ; a=index('0123456789ABCDEFGHIJKLMNUQ',result) ; call CHECK
  187.     if a=0 then signal MODULE4A ; if a<17 then signal MODULE4B
  188.     if a>16 & a<25 then do ; a=a-16 ; signal MODULE4C ; end
  189.     if a=25 then signal MODULE4D ; if a=26 then do ; tr 'cdQuit'
  190.         call GRID2 ; signal START9B ; end
  191. MODULE4B: /* Get the SECOND Color, IF the FIRST Color is FOREGROUND Color. */
  192.     tr substr('0123456789ABCDEF',a,1) ; a1=a
  193.     se '64H <1ca' ; gc ; b=index('0123456789ABCDEF',result) ; call CHECK
  194.     if b=0 | b=a then signal MODULE4B
  195.         else do ; tr substr('0123456789ABCDEF',b,1) ; a2=b ; end
  196.     tr 'c'sw.a2||mc.a1'c'sw.a1||mc.a2
  197.     t=sw.a1 ; sw.a1=sw.a2 ; sw.a2=t
  198.   signal MODULE4A
  199. MODULE4C: /* Get the SECOND Color, IF the FIRST Color is BACKGROUND Color. */
  200.     tr substr('01234567',a,1) ; a1=a
  201.     se '64H <1ca' ; gc ; b=index('GHIJKLMN',result) ; call CHECK
  202.     if b=0 | b=a then signal MODULE4C
  203.         else do ; tr substr('01234567',b,1) ; a2=b ; end
  204.     a3=a1+16 ; a4=a2+16 ; tr 'c'sw.a4||mz.a1'c'sw.a3||mz.a2
  205.     t=sw.a3 ; sw.a3=sw.a4 ; sw.a4=t
  206.   signal MODULE4A
  207. MODULE4D: /* Create the CONVERSION String, then Clean Up Screen. */
  208.     a='' ; do i=1 to 16 ; a=a'\c'sw.i' ' ; end i
  209.     do i=17 to 24 ; a=a'\z'sw.i' ' ; end ; c0=a ; call GRID2
  210.   return
  211. MODULE4E: /* Actual Color Swap Conversion Routine Starts Here. */
  212.     call READFILE ; steps=2 ; sleft=2 ; tr '44Hca'steps'71H'sleft
  213.     do i=1 to tot ; tr '17H'right(i,5,'-')
  214.     if index(l.i,'c')=0 then iterate i
  215.     else do ; lines=lines+1 ; tr '44H'right(lines,5,'-') ; end
  216.     do j=1 to 24 ; a=word(c4,j) ; b=word(c0,j)
  217.     do until z=0 ; z=index(l.i,a) ; if z>0 then do ; l.i=overlay(b,l.i,z)
  218.     codes=codes+1 ; tr '71H'right(codes,5,'-') ; end
  219.     end ; end j ; end i ; sleft=sleft-1 ; lines=0 ; codes=0
  220.     tr '71H'sleft ; do i=1 to tot ; tr '17H'right(i,5,'-')
  221.     if index(l.i,'\c')=0 then iterate i
  222.     else do ; lines=lines+1 ; tr '44H'right(lines,5,'-') ; end
  223.     do j=1 to 24 ; a=word(c3,j) ; b=word(c4,j)
  224.     do until z=0 ; z=index(l.i,a) ; if z>0 then do ; l.i=overlay(b,l.i,z)
  225.     codes=codes+1 ; tr '71H'right(codes,5,'-') ; end
  226.     end ; end j ; end i ; sleft=sleft-1
  227.     tr '71H'sleft ; call SAVEFILE
  228.   return
  229.  
  230. MODULE5:  /* Make High 8 MCI Colors into Low 8 MCI Colors & Vice Versa */
  231.     call READFILE ; steps=3 ; sleft=3 ; tr '44Hca'steps'71H'sleft
  232.     do i=1 to tot ; tr '17H'right(i,5,'-')
  233.     if index(l.i,'c')=0 then iterate i
  234.     else do ; lines=lines+1 ; tr '44H'right(lines,5,'-') ; end
  235.     do j=1 to 8 ; a=word(c1,j) ; b=word(c8,j)
  236.     do until z=0 ; z=index(l.i,a) ; if z>0 then do ; l.i=overlay(b,l.i,z)
  237.     codes=codes+1 ; tr '71H'right(codes,5,'-') ; end
  238.     end ; end j ; end i ; codes=0 ; lines=0 ; sleft=sleft-1 ; tr '71H'sleft
  239.     do i=1 to tot ; tr '17H'right(i,5,'-')
  240.     if index(l.i,'c')=0 then iterate i
  241.     else do ; lines=lines+1 ; tr '44H'right(lines,5,'-') ; end
  242.     do j=1 to 8 ; a=word(c2,j) ; b=word(c7,j)
  243.     do until z=0 ; z=index(l.i,a) ; if z>0 then do ; l.i=overlay(b,l.i,z)
  244.     codes=codes+1 ; tr '71H'right(codes,5,'-') ; end
  245.     end ; end j ; end i ; codes=0 ; lines=0 ; sleft=sleft-1 ; tr '71H'sleft
  246.     do i=1 to tot ; tr '17H'right(i,5,'-')
  247.     if index(l.i,'\c')=0 then iterate i
  248.     else do ; lines=lines+1 ; tr '44H'right(lines,5,'-') ; end
  249.     do j=1 to 16 ; a=word(c3,j) ; b=word(c4,j)
  250.     do until z=0 ; z=index(l.i,a) ; if z>0 then do ; l.i=overlay(b,l.i,z)
  251.     codes=codes+1 ; tr '71H'right(codes,5,'-') ; end
  252.     end ; end j ; end i ; sleft=sleft-1 ; tr '71H'sleft ; call SAVEFILE
  253.   return
  254.  
  255. MODULE6: /* Change High 8 MCI Colors to Low 8 MCI Colors (NO BRIGHTS) */
  256.     call READFILE ; steps=1 ; sleft=1 ; tr '44Hca'steps'71H'sleft
  257.     do i=1 to tot ; tr '17H'right(i,5,'-')
  258.     if index(l.i,'c')=0 then iterate i
  259.     else do ; lines=lines+1 ; tr '44H'right(lines,5,'-') ; end
  260.     do j=1 to 8 ; a=word(c2,j) ; b=word(c1,j)
  261.     do until z=0 ; z=index(l.i,a) ; if z>0 then do ; l.i=overlay(b,l.i,z)
  262.     codes=codes+1 ; tr '71H'right(codes,5,'-') ; end
  263.     end ; end j ; end i ; sleft=sleft-1
  264.     tr '71H'sleft ; call SAVEFILE
  265.   return
  266.  
  267. MODULE7: /* Change Control-Q MCI Colors into Control-Y MCI Colors */
  268.     call READFILE ; steps=1 ; sleft=1 ; tr '44Hca'steps'71H'sleft
  269.     do i=1 to tot ; tr '17H'right(i,5,'-')
  270.     if index(l.i,'c')=0 then iterate i
  271.     else do ; lines=lines+1 ; tr '44H'right(lines,5,'-') ; end
  272.     do j=1 to 24 ; a=word(c6,j) ; b=word(c4,j)
  273.     do until z=0 ; z=index(l.i,a) ; if z>0 then do
  274.         l.i=delstr(l.i,z,4) ; l.i=insert(b,l.i,z-1,3)
  275.     codes=codes+1 ; tr '71H'right(codes,5,'-') ; end
  276.     end ; end j ; end i ; sleft=sleft-1
  277.     tr '71H'sleft ; call SAVEFILE
  278.   return
  279.  
  280. MODULE8: /* Change from Old MCI Color Order to New MCI Color Order */
  281.     call READFILE ; steps=2 ; sleft=2 ; tr '44Hca'steps'71H'sleft
  282.     do i=1 to tot ; tr '17H'right(i,5,'-')
  283.     if index(l.i,'c')=0 then iterate i
  284.     else do ; lines=lines+1 ; tr '44H'right(lines,5,'-') ; end
  285.     do j=1 to 24 ; a=word(c5,j) ; b=word(c3,j)
  286.     do until z=0 ; z=index(l.i,a) ; if z>0 then do ; l.i=overlay(b,l.i,z)
  287.     codes=codes+1 ; tr '71H'right(codes,5,'-') ; end
  288.     end ; end j ; end i ; sleft=sleft-1 ; lines=0 ; codes=0
  289.     tr '71H'sleft ; do i=1 to tot ; tr '17H'right(i,5,'-')
  290.     if index(l.i,'\c')=0 then iterate i
  291.     else do ; lines=lines+1 ; tr '44H'right(lines,5,'-') ; end
  292.     do j=1 to 24 ; a=word(c3,j) ; b=word(c4,j)
  293.     do until z=0 ; z=index(l.i,a) ; if z>0 then do ; l.i=overlay(b,l.i,z)
  294.     codes=codes+1 ; tr '71H'right(codes,5,'-') ; end
  295.     end ; end j ; end i ; sleft=sleft-1
  296.     tr '71H'sleft ; call SAVEFILE
  297.   return
  298.  
  299. MODULE9: /* Change Set MCI Colors to Other MCI Colors (Change Them) */
  300.     if loop>1 then return;else call GRID1
  301. MODULE9A: /* Get COLOR to CHANGE */
  302.     call INFO('c6Select c9Color c6to cbCHANGEc9:         c6Now Select c9Color c6to Change cbTOc9:     ')
  303.     se '27Hca' ; gc ; a=index('0123456789ABCDEFGHIJKLMNUQ',result) ; call CHECK
  304.     if a=0 then signal MODULE9A ; if a<17 then signal MODULE9B
  305.     if a>16 & a<25 then do ; a=a-16 ; signal MODULE9C ; end
  306.     if a=25 then signal MODULE9D ; if a=26 then do ; tr 'cdQuit'
  307.         call GRID2 ; signal START9B ; end
  308. MODULE9B: /* CHANGE Color to THIS Color if FOREGROUND. */
  309.     tr substr('0123456789ABCDEF',a,1) ; a1=a
  310.     se '66H <1ca' ; gc ; b=index('0123456789ABCDEF',result) ; call CHECK
  311.     if b=0 then signal MODULE4B
  312.         else do ; z=substr('0123456789abcdef',b,1) ; tr z ; a2=b ; end
  313.     tr 'c'sw.a2||mc.a1 ; sw.a1=z
  314.   signal MODULE9A
  315. MODULE9C: /* CHANGE Color to THIS Color if BACKGROUND. */
  316.     tr substr('01234567',a,1) ; a1=a
  317.     se '66H <1ca' ; gc ; b=index('GHIJKLMN',result) ; call CHECK
  318.     if b=0 then signal MODULE9C
  319.         else do ; z=substr('01234567',b,1) ; tr z ; a2=b ; end
  320.     a3=a1+16 ; a4=a2+16 ; tr 'c'sw.a4||mz.a1 ; sw.a3=z
  321.   signal MODULE9A
  322. MODULE9D: /* Create Conversion String & Clean Up Screen. */
  323.     a='' ; tr 'c9Use' ; do i=1 to 16 ; a=a'\c'sw.i' ' ; end i
  324.     do i=17 to 24 ; a=a'\z'sw.i' ' ; end ; c0=a ; call GRID2
  325.   return
  326. MODULE9E: /* Actual MCI Change Conversion Routine Starts Here. */
  327.     call READFILE ; steps=2 ; sleft=2 ; tr '44Hca'steps'71H'sleft
  328.     do i=1 to tot ; tr '17H'right(i,5,'-')
  329.     if index(l.i,'c')=0 then iterate i
  330.     else do ; lines=lines+1 ; tr '44H'right(lines,5,'-') ; end
  331.     do j=1 to 24 ; a=word(c4,j) ; b=word(c0,j)
  332.     do until z=0 ; z=index(l.i,a) ; if z>0 then do ; l.i=overlay(b,l.i,z)
  333.     codes=codes+1 ; tr '71H'right(codes,5,'-') ; end
  334.     end ; end j ; end i ; sleft=sleft-1 ; lines=0 ; codes=0
  335.     tr '71H'sleft ; do i=1 to tot ; tr '17H'right(i,5,'-')
  336.     if index(l.i,'\c')=0 then iterate i
  337.     else do ; lines=lines+1 ; tr '44H'right(lines,5,'-') ; end
  338.     do j=1 to 24 ; a=word(c3,j) ; b=word(c4,j)
  339.     do until z=0 ; z=index(l.i,a) ; if z>0 then do ; l.i=overlay(b,l.i,z)
  340.     codes=codes+1 ; tr '71H'right(codes,5,'-') ; end
  341.     end ; end j ; end i ; sleft=sleft-1
  342.     tr '71H'sleft ; call SAVEFILE
  343.   return
  344.  
  345. MODULE10: /* Strip ALL 3-Character Control-Y MCI Codes from the file. */
  346.     call READFILE ; steps=1 ; sleft=1 ; tr '44Hca'steps'71H'sleft
  347.     do i=1 to tot ; tr '17H'right(i,5,'-')
  348.     if index(l.i,'')=0 then iterate i
  349.     else do ; lines=lines+1 ; tr '44H'right(lines,5,'-') ; end
  350.     a='' ; do until z=0 ; z=index(l.i,a) ; if z>0 then do
  351.         l.i=delstr(l.i,z,3) ; codes=codes+1 ; tr '71H'right(codes,5,'-')
  352.     end ; end ; end i ; sleft=sleft-1
  353.     tr '71H'sleft ; call SAVEFILE
  354.   return
  355.  
  356. READFILE: /* Read In "line by line" the ORIGINAL File. */
  357.     call open(f1,file1,'r') ; i=0
  358.         do until eof(f1) ; i=i+1 ; se '17H'right(i-1,5,'-')
  359.             l.i=readln(f1) ; end ; tot=i-1
  360.     call close(f1) ; tr ' c9Donec6.'
  361.   return
  362.  
  363. SAVEFILE: /* Save "line by line" the CONVERTED File. */
  364.     call open(f1,file2,'w')
  365.         do i=1 to tot ; call writeln(f1,l.i)
  366.         se '17H'right(i,5,'-') ; end i
  367.     call close(f1) ; se ' c9Donec6.   '
  368.     if words(zz)=1 then se 'c7<cdkeyc7>g1'
  369.   return
  370.  
  371. CLEAR: /* Clears text box at BOTTOM of Window. */
  372.     do i=18 to 22 ; tr ''i';2H'copies(' ',77) ; end i
  373.   return
  374.  
  375. INFO: /* Displays INFO Text in box right above LARGE Text box. */
  376.     parse arg text
  377.     tr '3H'copies(' ',76)
  378.     se '3H'text's'
  379.   return
  380.  
  381. SETUP: /* Define Conversion Strings, Screen Display Strings, Variables */
  382.     file1='' ; file2='' ; pt1r=1 ; pt1c=1 ; pt2c=1 ; pt3c=1
  383.     sw='0123456789abcdef01234567' ; do i=1 to 24 ; sw.i=substr(sw,i,1) ; end i
  384.     c1='c0 c1 c2 c3 c4 c5 c6 c7' /* Control-Y low  8 colors.     */
  385.     c2='c8 c9 ca cb cc cd ce cf' /* Control-Y high 8 colors.     */
  386.     /* c3=slash new order codes, c4=control-y new order codes.           */
  387.     c3='\c0 \c1 \c2 \c3 \c4 \c5 \c6 \c7 \c8 \c9 \ca \cb \cc \cd \ce \cf \z0 \z1 \z2 \z3 \z4 \z5 \z6 \z7'
  388.     c4='c0 c1 c2 c3 c4 c5 c6 c7 c8 c9 ca cb cc cd ce cf z0 z1 z2 z3 z4 z5 z6 z7'
  389.     /* c5=control-y old order codes.                                     */
  390.     c5='c0 c7 c1 c6 c5 c2 c4 c3 c8 cf c9 ce cd ca cc cb z0 z7 z1 c6 z5 z2 z4 z3'
  391.     /* c6=control-q new order codes.                                     */
  392.     c6='c0} c1} c2} c3} c4} c5} c6} c7} c8} c9} ca} cb} cc} cd} ce} cf} z0} z1} z2} z3} z4} z5} z6} z7}'
  393.     c7='\c0 \c1 \c2 \c3 \c4 \c5 \c6 \c7' /* Slash low  8 colors.         */
  394.     c8='\c8 \c9 \ca \cb \cc \cd \ce \cf' /* Slash high 8 colors.         */
  395.     op.1.1='2Hce  u1Lu0ow 8 to  2H   High 8   ' ; op.2.1='2Hcb   u1Hu0igh 8   2H  to Low 8  '
  396.     op.1.2='5Hcb Control-u1Yu0  5H Control-Q  ' ; op.2.2='5Hce Cou1nu0trol-Q  5H Control-Y  '
  397.     op.1.3='8Hce u1Su0lash to   8H Control-Y  ' ; op.2.3='8Hcb u1Ou0ld to New 8H Code Order '
  398.     op.1.4='1Hcb u1Mu0CI Color  1H  Swapper   ' ; op.2.4='1Hce MCI u1Cu0olor  1H  Changer   '
  399.     op.1.5='4Hce Hu1iu0gh 2 Low 4H Low 2 High ' ; op.2.5='4Hcb  MCI Cou1du0e  4H  Stripper  '
  400.     op.1.6='7Hcb Eu1xu0pansion  7H  Slot # 1  ' ; op.2.6='7Hce u1Qu0uit Back  7H  to CNet   '
  401.     vi.1='03Hce u1Nu0EITHER ' ; vi.2='13Hcb u1Bu0EFORE ' ; vi.3='22Hce u1Au0FTER ' ; vi.4='30Hcb Bu1Ou0TH '
  402.     mo.1='39Hce u1Su0TART '   ; mo.2='47Hcb u1Qu0UIT '   ; mo.3='54Hce u1Ru0ESTART '
  403.     mo.4='64Hcb u1Cu0HART '   ; mo.5='72Hce u1Iu0NFO '
  404.     mc.1 ='02H█' ; mc.2 ='04H█' ; mc.3 ='06H█' ; mc.4 ='08H█'
  405.     mc.5 ='10H█' ; mc.6 ='12H█' ; mc.7 ='14H█' ; mc.8 ='16H█'
  406.     mc.9 ='18H█' ; mc.10='20H█' ; mc.11='22H█' ; mc.12='24H█'
  407.     mc.13='26H█' ; mc.14='28H█' ; mc.15='30H█' ; mc.16='32H█'
  408.     mz.1 ='64H█' ; mz.2 ='66H█' ; mz.3 ='68H█' ; mz.4 ='70H█'
  409.     mz.5 ='72H█' ; mz.6 ='74H█' ; mz.7 ='76H█' ; mz.8 ='78H█'
  410.   return
  411.  
  412. TITLE: /* Main Title Screen (Created Using An ANSI-Drawing Program) */
  413.     tr 'f1@4┌─────────────────────────────────────────────────────────────────────────────┐'
  414.     tr '│   CNet Amiga MCI Color Updater/Converter Utility by Dotoran of Frontiers!   │'
  415.     tr '├────────────┬────────────┬────────────┬────────────┬────────────┬────────────┤'
  416.     tr '│  u1Lu0ow 8 to  │ Control-u1Yu0  │ u1Su0lash to   │ u1Mu0CI Color  │ Hu1iu0gh 2 Low │ Eu1xu0pansion  │'
  417.     tr '│   High 8   │ Control-Q  │ Control-Y  │  Swapper   │ Low 2 High │  Slot #1   │'
  418.     tr '├────────────┼────────────┼────────────┼────────────┼────────────┼────────────┤'
  419.     tr '│   u1Hu0igh 8   │ Cou1nu0trol-Q  │ u1Ou0ld to New │ MCI u1Cu0olor  │  MCI Cou1du0e  │ u1Qu0uit Back  │'
  420.     tr '│  to Low 8  │ Control-Y  │ Code Order │  Changer   │  Stripper  │  to CNet   │'
  421.     tr '├────────────┴────────────┴────────────┴────────────┴────────────┴────────────┤'
  422.     tr '│ Path/File to LOAD:                                                          │'
  423.     tr '├─────────────────────────────────────────────────────────────────────────────┤'
  424.     tr '│ Path/File to SAVE:                                                          │'
  425.     tr '├───────────────────────────────────┬─────────────────────────────────────────┤'
  426.     tr '│  u1Nu0EITHER   u1Bu0EFORE   u1Au0FTER   Bu1Ou0TH  │  u1Su0TART   u1Qu0UIT   u1Ru0ESTART   u1Cu0HART   u1Iu0NFO  │'
  427.     tr '├───────────────────────────────────┴─────────────────────────────────────────┤'
  428.     tr '│C│'
  429.     tr '├─────────────────────────────────────────────────────────────────────────────┤'
  430.     do 5 ; tr '│C│' ; end
  431.     tr '└─────────────────────────────────────────────────────────────────────────────┘'
  432.   return
  433.  
  434. CHART: /* MCI-ANSI Color Code Chart (Also Created Using An ANSI-Drawer) */
  435.     tr 'f1┌─────────────────────────────────────────────────────────────────────────────┐'
  436.     tr '│ \ is a Control-Y C    MCI/ANSI Color Chart    C ~ is an ESC(ape) Key │'
  437.     tr '├────────────────┬────────────────┬────────────────────┬──────────────────────┤'
  438.     tr '│ OLD Order MCI   NEW Order MCI    ANSI ForeGrounds    ANSI BackGrounds    │'
  439.     tr '├────────────────┼────────────────┼────────────────────┼──────────────────────┤'
  440.     tr '│ \c0 Black    │ \c0 Black    │ ~[0;30m Black    │ ~[0;40m - Black      │'
  441.     tr '│ \c1 White    │ \c1 RedC│ ~[0;31m RedC│ ~[0;41m - Red        │'
  442.     tr '│ \c2 - RedC│ \c2 Green    │ ~[0;32m Green    │ ~[0;42m - Green      │'
  443.     tr '│ \c3 - CyanC│ \c3 Yellow   │ ~[0;33m Yellow   │ ~[0;43m - Yellow     │'
  444.     tr '│ \c4 - Purple   │ \c4 BlueC│ ~[0;34m BlueC│ ~[0;44m - Blue       │'
  445.     tr '│ \c5 - Green    │ \c5 Purple   │ ~[0;35m Purple   │ ~[0;45m - Purple     │'
  446.     tr '│ \c6 - BlueC│ \c6 CyanC│ ~[0;36m CyanC│ ~[0;46m - Cyan       │'
  447.     tr '│ \c7 - Yellow   │ \c7 White    │ ~[0;37m White    │ ~[0;47m - White      │'
  448.     tr '│ \c8 - Lt.Black │ \c8 Lt.Black │ ~[1;30m Lt.Black │ ~[1;40m - Lt.Black   │'
  449.     tr '│ \c9 - Lt.White │ \c9 Lt.Red   │ ~[1;31m Lt.Red   │ ~[1;41m - Lt.Red     │'
  450.     tr '│ \cA - Lt.Red   │ \cA Lt.Green │ ~[1;32m Lt.Green │ ~[1;42m - Lt.Green   │'
  451.     tr '│ \cB - Lt.Cyan  │ \cB Lt.Yellow│ ~[1;33m Lt.Yellow│ ~[1;43m - Lt.Yellow  │'
  452.     tr '│ \cC - Lt.Purple│ \cC Lt.Blue  │ ~[1;34m Lt.Blue  │ ~[1;44m - Lt.Blue    │'
  453.     tr '│ \cD - Lt.Green │ \cD Lt.Purple│ ~[1;35m Lt.Purple│ ~[1;45m - Lt.Purple  │'
  454.     tr '│ \cE - Lt.Blue  │ \cE Lt.Cyan  │ ~[1;36m Lt.Cyan  │ ~[1;46m - Lt.Cyan    │'
  455.     tr '│ \cF - Lt.Yellow│ \cF - Lt.White │ ~[1;37m - Lt.White │ ~[1;47m - Lt.White   │'
  456.     tr '│C│C│C│C│'
  457.     se '└────────────────┴─────────Press──┴──AnyKey───────────┴──────────────────────┘g1'
  458.   return
  459.  
  460. GRID1: /* Draws that Color Select Graphic in "MCI Swapper" & "MCI Changer" */
  461.     call CLEAR ; tr '1H├───────────────────────────────┬─────────────────────────────┬───────────────┤'
  462.     tr '│█ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █│<══Original Color Template══>█ █ █ █ █ █ █ │'
  463.     tr '│F│C│N│'
  464.     tr '│█ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █│<══Modified Color Template══>█ █ █ █ █ █ █ │'
  465.     tr '├───────────────────────────────┤C├───────────────┤'
  466.     tr '│     ForeGround MCI Colors     │  [U]se These    [Q]uit Now    BackGrounds  │'
  467.     tr '└───────────────────────────────┴─────────────────────────────┴───────────────┘'
  468.   return
  469. GRID2: /* Cleans up Text Box at Bottom of Screen AFTER Above is Printed. */
  470.     tr '1H├─────────────────────────────────────────────────────────────────────────────┤'
  471.     do 5 ; tr '│C│' ; end ; call CLEAR
  472.     tr '└─────────────────────────────────────────────────────────────────────────────┘'
  473.   return
  474.  
  475. HELP: /* Figure Out Which Help Screen to Display, then Display it. */
  476.     a='HELP'||pt1r||pt1c ; signal (a)
  477. HELP11: /* Row 1, Column 1 */
  478.     tr '2H z4ce                    Lower 8 Colors into Higher 8 Colors                    z0 '
  479.     tr '2H                                                                             '
  480.     tr '2H cb   Some older Arexx and/or Text files for CNet Amiga may have been written  '
  481.     tr '2H to only take advantage of the first eight MCI Color Codes. This module will '
  482.     tr '2H convert the lower eight MCI Color Codes into the upper eight MCI Colors.    '
  483.   return
  484. HELP12: /* Row 1, Column 2 */
  485.     tr '2H z4cb                         Control-Y into Control-Q                          z0 '
  486.     tr '2H                                                                             '
  487.     tr '2H ce   Sometimes, it may be helpful if all Color Codes used the FOUR character  '
  488.     tr '2H long Control-Q format, instead of the THREE character Control-Y format. Use '
  489.     tr '2H this module to change all Control-Y Color Codes into Control-Q Color Codes. '
  490.   return
  491. HELP13: /* Row 1, Column 3 */
  492.     tr '2H z4ce                           Slash into Control-Y                            z0 '
  493.     tr '2H                                                                             '
  494.     tr '2H cb   Versions of CNet Amiga earlier than v2.42e used the SLASH character as   '
  495.     tr '2H the MCI Command Character. This module UPDATES older MCI Color Codes that   '
  496.     tr '2H used the SLASH into newer MCI formats that use the Control-Y character.     '
  497.   return
  498. HELP14: /* Row 1, Column 4 */
  499.     tr '2H z4cb                             MCI Color Swapper                             z0 '
  500.     tr '2H                                                                             '
  501.     tr '2H ce   This module lets you select alternate colors for those presently used in '
  502.     tr '2H the file you wish to convert. For instance, using this module, change ALL   '
  503.     tr '2H occurances of green into yellow, red into blue, yellow into purple, etc.    '
  504.   return
  505. HELP15: /* Row 1, Column 5 */
  506.     tr '2H z4ce     High 8 Colors into Low 8 Colors / Low 8 Colors into High 8 Colors     z0 '
  507.     tr '2H                                                                             '
  508.     tr '2H cb   This utility allows you to swap both the high 8 colors and the low 8     '
  509.     tr '2H colors found in the file. In other words, all light greens become greens,   '
  510.     tr '2H all greens become light greens. Reds into light reds, light reds into reds. '
  511.   return
  512. HELP16: /* Row 1, Column 6 */
  513.     tr '2H z4cb                            Expansion Slot # 1                             z0 '
  514.     tr '2H                                                                             '
  515.     tr '2H ce   This spot may be filled with an additional utility module sometime in    '
  516.     tr '2H the near future. Any suggestions?                                           '
  517.     tr '2H                                                                             '
  518.   return
  519. HELP21: /* Row 2, Column 1 */
  520.     tr '2H z4cb                  High 8 MCI Colors into Low 8 MCI Colors                  z0 '
  521.     tr '2H                                                                             '
  522.     tr '2H ce   Although I like to suggest you always color code programs and text files '
  523.     tr '2H using the FULL spectrum of 16 MCI/ANSI Colors, you may find the need to NOT '
  524.     tr '2H use the high 8 colors (intense). This module converts all highs into lows.  '
  525.   return
  526. HELP22: /* Row 2, Column 2 */
  527.     tr '2H z4ce                         Control-Q into Control-Y                          z0 '
  528.     tr '2H                                                                             '
  529.     tr '2H cb   It is advisable to use the THREE character Control-Y MCI Color Codes as  '
  530.     tr '2H they tend to execute a bit faster than the FOUR character Control-Q Color   '
  531.     tr '2H Codes. This module makes doing this conversion a snap!                      '
  532.   return
  533. HELP23: /* Row 2, Column 3 */
  534.     tr '2H z4cb               Old MCI Color Order into New MCI Color Order                z0 '
  535.     tr '2H                                                                             '
  536.     tr '2H ce   Shortly before CNet Amiga went 2.04 DOS ONLY, the ORDER the MCI Color    '
  537.     tr '2H codes came in differed from the ANSI Color Code order. As of Cnet v2.42e,   '
  538.     tr '2H the MCI Color Codes appear in the SAME order that ANSI Color Codes appear.  '
  539.   return
  540. HELP24: /* Row 2, Column 4 */
  541.     tr '2H z4ce                             MCI Color Changer                             z0 '
  542.     tr '2H                                                                             '
  543.     tr '2H cb   The Color Changer is similar to the Color Swapper, with one important    '
  544.     tr '2H difference. This utility CHANGES one color, while leaving the other color   '
  545.     tr '2H intact. For instance, change red into green, but NOT green into red, etc.   '
  546.   return
  547. HELP25: /* Row 2, Column 5 */
  548.     tr '2H z4cb                             MCI Code Stripper                             z0 '
  549.     tr '2H                                                                             '
  550.     tr '2H    This is a simple utility that will STRIP, or REMOVE, all three character '
  551.     tr '2H Control-Y MCI Codes found within the specified file. This is useful for use '
  552.     tr '2H with FIDO and other Networks that frown upon MCI use. See READ_ME for info. '
  553.   return
  554. HELP26: /* Row 2, Column 6 */
  555.     tr '2H z4ce                           Quit Back to CNet Now                           z0 '
  556.     tr '2H                                                                             '
  557.     tr '2H cb   A quick way to exit this program is selecting this button. You can also  '
  558.     tr '2H use the QUIT button shown below, although this button exits immediately,    '
  559.     tr '2H without first asking you if you are SURE you wish to leave.                 '
  560.   return
  561. HELPB: /* Find Needed VIEW MODE Help Screen & Display It. */
  562.     a='HELPB'||pt2c ; signal (a)
  563. HELPB1: /* Column 1 */
  564.     tr '2H z4ce                           Use NEITHER View Mode                           z0 '
  565.     tr '2H                                                                             '
  566.     tr '2H cb   Selecting to view NEITHER before or after conversion is the quickest way '
  567.     tr '2H to do a conversion, because the program does not have to worry about the    '
  568.     tr '2H actual displaying of files. This mode is the preferable choice on PFILES.   '
  569.   return
  570. HELPB2: /* Column 2 */
  571.     tr '2H z4cb                             View BEFORE Mode                              z0 '
  572.     tr '2H                                                                             '
  573.     tr '2H ce   Selecting to view the file BEFORE the conversion will show you what the  '
  574.     tr '2H file looks like in its present state, BEFORE any conversion is done to the  '
  575.     tr '2H file. The finished output file will NOT be shown upon completion.           '
  576.   return
  577. HELPB3: /* Column 3 */
  578.     tr '2H z4ce                              View AFTER Mode                              z0 '
  579.     tr '2H                                                                             '
  580.     tr '2H cb   Selecting to view the file AFTER the conversion will only show you what  '
  581.     tr '2H the file looks like AFTER it has been converted. The BEFORE, AFTER and the  '
  582.     tr '2H BOTH View modes are best used when viewing TEXT and DOC files.              '
  583.   return
  584. HELPB4: /* Column 4 */
  585.     tr '2H z4cb                        View BEFORE and AFTER Mode                         z0 '
  586.     tr '2H                                                                             '
  587.     tr '2H ce   Selecting to view BOTH will show you what the file looks like BEFORE it  '
  588.     tr '2H has been converted and will show you what it looks like AFTER it has been   '
  589.     tr '2H converted. This is the preferred method when converting TEXT and DOC files. '
  590.   return
  591.  
  592. HELPC: /* Find Needed START MODE Help Screen & Display It. */
  593.     a='HELPC'||pt3c ; signal (a)
  594. HELPC1: /* Column 1 */
  595.     tr '2H z4ce                            The START Operation                            z0 '
  596.     tr '2H                                                                             '
  597.     tr '2H cb   This will START the conversion operation. The LOAD file will be read in  '
  598.     tr '2H line by line, then the conversion process will start. Counters for lines,   '
  599.     tr '2H conversions, etc. will be shown in this window.                             '
  600.   return
  601. HELPC2: /* Column 2 */
  602.     tr '2H z4cb                             The QUIT Operation                            z0 '
  603.     tr '2H                                                                             '
  604.     tr '2H ce   When you select QUIT, you will be asked for confirmation, upon which the '
  605.     tr '2H program will exit. This is similar to "Quit to CNet" above, except that you '
  606.     tr '2H will be asked for confirmation before the file is actually exited.          '
  607.   return
  608. HELPC3: /* Column 3 */
  609.     tr '2H z4ce                           The RESTART Operation                           z0 '
  610.     tr '2H                                                                             '
  611.     tr '2H cb   By selecting RESTART, the screen will be redrawn, and you will then be   '
  612.     tr '2H able to select all the conversion modes again. This is helpful in the event '
  613.     tr '2H you made a wrong selection previously.                                      '
  614.   return
  615. HELPC4: /* Column 4 */
  616.     tr '2H z4cb                            The CHART Operation                            z0 '
  617.     tr '2H                                                                             '
  618.     tr '2H ce   The CHART will show you a screen of all known MCI and ANSI Color Codes,  '
  619.     tr '2H in both the NEW and OLD formats. This may be helpful in your selection as   '
  620.     tr '2H to which conversion process you really wish to use.                         '
  621.   return
  622. HELPC5: /* Column 5 */
  623.     tr '2H z4ce                            The INFO Operation                             z0 '
  624.     tr '2H                                                                             '
  625.     tr '2H cb   This program was written by Dotoran of Frontiers BBS. If you find fault  '
  626.     tr '2H with this utility, please call:                                             '
  627.     tr '2H                                           Frontiers BBS (716) / 823- 9892 ! '
  628.   return
  629.  
  630. CHECK:
  631.     if result~='###PANIC' then return
  632.     tr 'f115Hc9LOSS OF CARRIER!'
  633.     logentry 'Lost Carrier in Color Utils, v1.0'
  634.     bufferflush ; exit
  635.  
  636. SYNTAX:;ERROR:;IOERR:;e1=' Error: 'rc' ('errortext(rc)')'
  637.   e2='  Line: 'left(sigl,4)'File:';gu 1311992;a=result;gu 1311960;b=result;c='"'a||b'"';e2=e2' 'c;tr e1;tr e2;logentry e1;logentry e2
  638.   e=sourceline(sigl);do while e~='';e3='Source: 'left(e,37);tr e3;logentry e3;e=substr(e,38);end;bufferflush;exit
  639. /** Last Edited: 7-Oct-95 *************************************************\
  640. \****************************************** Frontiers BBS (716)/823-9892 **/
  641.